package com.kimwu.design.visitor.visitor.impl;

import com.kimwu.design.visitor.soldier.impl.Archer;
import com.kimwu.design.visitor.soldier.impl.Gunner;
import com.kimwu.design.visitor.soldier.impl.Rider;
import com.kimwu.design.visitor.visitor.Visitor;

public class AttackVisitor implements Visitor {
    @Override
    public void visit(Gunner gunner) {
        System.out.println(gunner.getGunner() + " 发起进攻");
    }
 
    @Override
    public void visit(Rider rider) {
        System.out.println(rider.getRider() + " 发起进攻");
    }
 
    @Override
    public void visit(Archer archer) {
        System.out.println(archer.getArcher() + " 发起进攻");
    }
}